#!/usr/bin/env python

from waf_dynamo import apidoc_extract_task

def init(ctx):
    pass

def options(opt):
    pass

def configure(conf):
    pass

def build(bld):
    liveupdate = bld.stlib(features = 'cxx',
                           includes = '.',
                           source   = bld.path.ant_glob('*.cpp'),
                           target   = 'liveupdate')

    liveupdate.source = [x for x in liveupdate.source if not 'null' in x.name]

    liveupdate_null = bld.stlib(features     = 'cxx',
                                includes     = '.',
                                source       = 'liveupdate_null.cpp',
                                target       = 'liveupdate_null')

    bld.recurse('test')

    apidoc_extract_task(bld, ['script_liveupdate.h'])

    bld.install_files('${PREFIX}/include/liveupdate', 'liveupdate.h')

def shutdown(self):
    pass
